package com.yunche.yunchebusiness.mvp.model

import com.yunche.yunchebusiness.base.BaseResponse
import com.yunche.yunchebusiness.base.rx.SchedulerUtils
import com.yunche.yunchebusiness.entity.BankListEntity
import com.yunche.yunchebusiness.network.RetrofitManager
import io.reactivex.Observable
import okhttp3.RequestBody

/**
 * Create by Crcker on 2018/12/28 19:03
 * Email: Crcker@163.com
 */


class AddTenantModel {

    fun getBankList(requestBody: RequestBody): Observable<BaseResponse<List<BankListEntity>>> {
        return RetrofitManager.service.getBankList(requestBody).compose(SchedulerUtils.ioToMain())
    }

    fun submit(requestBody: RequestBody, id: String): Observable<BaseResponse<String>> {
        return RetrofitManager.service.submitTenantInfo(requestBody,id).compose(SchedulerUtils.ioToMain())
    }
}